package lesson01;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo0106 {
    public static void main(String[] args) throws IOException {
        File file=new File("./TestOutput.txt");
        file.createNewFile();
        byte[] bytes=new byte[3];
        bytes[0]='q';
        bytes[1]=98;
        FileOutputStream fileOutputStream=new FileOutputStream(file);
        fileOutputStream.write(bytes);
        //刷新缓冲区，让数据真正写入到目标文件
        fileOutputStream.flush();
        fileOutputStream.close();

    }
}
